import request from '@/utils/request'

export function login(formData) {
  return request({
    url: '/user-center/web/login',
    method: 'post',
    data: formData
  })
}

export function getInfo(token) {
  return request({
    url: '/user-center/web/infoByToken',
    method: 'post',
    headers:{// 设置请求头
      token: token
    }
  })
}


export function logout(token) {
  return request({
    url: `/user-center/web/logout/${token}`,
    method: 'post'
  })
}

/**
 * 跳转到门户登录网站
 * @returns {AxiosPromise}
 */
export function gotoLogin() {
  return request({
    url: '/user-center/index',
    method: 'get'
  })
}
